﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace MyEditor 
{
    /// <summary>
    /// 窗口辅助工具(因为不支持静态函数传入，所以需要在对应的窗口内做实例化才能使用)
    /// </summary>
    public class WindowTools 
    {
        /// <summary>
        /// 设置窗口的宽度和高度
        /// </summary>
        /// <param name="width"></param>
        /// <param name="height"></param>
        /// <returns></returns>
        public GUILayoutOption[]  SetGUIOption(float width,float height)
        {
            GUILayoutOption[] options = new GUILayoutOption[2];
            options[0] = GUILayout.MaxWidth(width);
            options[1] = GUILayout.MinHeight(height);
            return options;
        }

        /// <summary>
        /// 80*40 按钮
        /// </summary>
        /// <returns></returns>
         public GUILayoutOption[]  SetGUIOption80_40()
         {
             return SetGUIOption(80,40);
         }
    }

}